<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:t="http://myfaces.apache.org/tomahawk">
    
    <ui:composition template="/pages/user/templates/userAdminTemplate.xhtml">
        <ui:define name="pageTitle">
            <h:outputText value="Edit User"/>
        </ui:define>    
    
        <ui:define name="centerPane">
            <h:form id="mainForm">
                <h:panelGrid columns="2">
                    <h:outputText value="#{msg['user.username.label']}"/>
                    <h:outputText value="#{updateUserAction.user.username}"/>
                    
                    <ui:include src="/pages/user/templates/commonUserFields.xhtml">
                        <ui:param name="user" value="#{updateUserAction.user}"/>
                    </ui:include>
                    <h:outputLink value="editUserRoles.jsf">
                        <f:param name="userId" value="#{updateUserAction.userId}"/>
                        <h:outputText value="Edit User Roles"/>
                    </h:outputLink>
                </h:panelGrid>
                <h:commandButton value="Save" action="#{updateUserAction.updateUser}">
                    <t:inputHidden id="userId" forceId="true" value="#{updateUserAction.userId}"/>
                </h:commandButton>
                <h:commandButton value="Cancel" action="gotoViewUsers" immediate="true"/>
            </h:form>
            
        </ui:define>
    </ui:composition>
    
    
</html>
